package com.qf.smsplatfrom.pojo;


import com.qf.smsplatfrom.util.CheckPhone;
import org.springframework.util.ObjectUtils;

public class TDescribe implements CheckNull{

  private Long id;
  private String list;
  private Long state;


  @Override
  public boolean isNull(CheckType type) {
    switch (type) {
      case ADD:
        return ObjectUtils.isEmpty(list)||ObjectUtils.isEmpty(state);
      case UPDATE:
        return ObjectUtils.isEmpty(list)||ObjectUtils.isEmpty(state);
      case DELETE:
        return ObjectUtils.isEmpty(id);
    }
    return CheckNull.super.isNull(type);
  }

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public String getList() {
    return list;
  }

  public void setList(String list) {
    this.list = list;
  }

  public Long getState() {
    return state;
  }

  public void setState(Long state) {
    this.state = state;
  }
}
